﻿<UserControl x:Class="BTM_Client_Application.LogControl"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      d:DesignHeight="300" d:DesignWidth="300" Initialized="LogControl_OnInitialized">

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colours.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
                <ResourceDictionary Source="pack://application:,,,/Styles/ButtonStyles.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
                <ResourceDictionary Source="pack://application:,,,/Styles/MyResources.xaml" />
                <ResourceDictionary Source="pack://application:,,,/Styles/DataGridStyle.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0">
            <Border BorderThickness="1,1,1,0" BorderBrush="Gray" SnapsToDevicePixels="True">
                <DockPanel Name="ItemsPanel" HorizontalAlignment="Stretch" LastChildFill="True" Background="{DynamicResource AccentColorBrush}">
                    <!--<Button Name="LogRefreshButton" VerticalAlignment="Center" Margin="5,0,0,0" Content="Refresh" Click="LogRefreshButton_OnClick"/>-->
                    <Grid Name="LogRefreshButtonContainer" VerticalAlignment="Center" Margin="5,0,0,0"/>
                    <Grid Name="FilterClearButtonContainer" VerticalAlignment="Center" Margin="5,0,0,0"/>
                    <Grid Name="GraphButtonContainer" VerticalAlignment="Center" Margin="5,0,0,0"/>
                    <!--<Button Name="FilterClearButton" VerticalAlignment="Center" Margin="5,0,0,0" Content="Clear" Click="FilterClearButton_OnClick"/>-->
                    <!--<Button Name="GraphButton" Content="Graph" VerticalAlignment="Center" Margin="5,0,0,0" Click="GraphButton_OnClick"/>-->
                    
                    <Grid Name="FilterContainer" Margin="5,0,0,0"/>
                </DockPanel>
            </Border>
        </Grid>
        <DataGrid Name="LogGrid" CanUserAddRows="False" CanUserDeleteRows="False" IsReadOnly="True" SelectionUnit="FullRow"
                  Style="{StaticResource DataGridStyle}"
                  AutoGenerateColumns="False" Grid.Row="1" CanUserReorderColumns="False" VerticalAlignment="Stretch" 
                  HorizontalAlignment="Stretch">
            
            <DataGrid.RowStyle>
                <Style TargetType="DataGridRow">
                    <Setter Property="Background" Value="{Binding ItemBackground}"/>
                    <Setter Property="Foreground" Value="{Binding ItemForeground}"/>
                    <Setter Property="FontFamily" Value="Segoe UI, Verdana"/>
                </Style>
            </DataGrid.RowStyle>
        </DataGrid>

    </Grid>
</UserControl>
